@primary-color: #1890ff;
@success-color: #52c41a;
@warning-color: #faad14;
@error-color: #f5222d;

.form-validation-page {
  padding: 24px;
  background-color: #f5f5f5;
  min-height: 100vh;

  .page-header {
    margin-bottom: 24px;

    .page-title {
      font-size: 24px;
      font-weight: bold;
      color: #333;
      margin-bottom: 8px;
    }

    .page-description {
      color: #666;
      font-size: 14px;
    }
  }

  .form-container {
    background-color: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;

    .form-title {
      font-size: 18px;
      font-weight: 500;
      margin-bottom: 24px;
      color: #333;
      border-bottom: 1px solid #f0f0f0;
      padding-bottom: 16px;
    }

    .form-section {
      margin-bottom: 32px;

      .section-title {
        font-size: 16px;
        font-weight: 500;
        margin-bottom: 16px;
        color: #333;
      }
    }

    .form-footer {
      display: flex;
      justify-content: flex-end;
      border-top: 1px solid #f0f0f0;
      padding-top: 16px;
      margin-top: 24px;

      button {
        margin-left: 8px;
      }
    }
  }

  .custom-form-item {
    margin-bottom: 24px;

    .ant-form-item-label {
      font-weight: 500;
    }

    &.has-error {
      .ant-input,
      .ant-select-selector {
        border-color: @error-color;
      }
    }

    &.has-warning {
      .ant-input,
      .ant-select-selector {
        border-color: @warning-color;
      }
    }

    &.has-success {
      .ant-input,
      .ant-select-selector {
        border-color: @success-color;
      }
    }
  }

  .validation-status {
    display: flex;
    align-items: center;
    margin-top: 24px;
    padding: 12px 16px;
    border-radius: 4px;

    &.error {
      background-color: #fff2f0;
      border: 1px solid #ffccc7;
    }

    &.warning {
      background-color: #fffbe6;
      border: 1px solid #ffe58f;
    }

    &.success {
      background-color: #f6ffed;
      border: 1px solid #b7eb8f;
    }

    .status-icon {
      font-size: 20px;
      margin-right: 8px;
    }

    .status-text {
      flex: 1;
    }
  }

  .validation-rules {
    background-color: #f9f9f9;
    padding: 16px;
    border-radius: 4px;
    margin-bottom: 24px;

    .rule-item {
      display: flex;
      align-items: center;
      margin-bottom: 8px;

      .rule-icon {
        margin-right: 8px;

        &.success {
          color: @success-color;
        }

        &.error {
          color: @error-color;
        }

        &.default {
          color: #d9d9d9;
        }
      }

      .rule-text {
        color: #666;
      }
    }
  }

  .dynamic-form-items {
    padding: 16px;
    background-color: #fafafa;
    border-radius: 4px;
    margin-bottom: 16px;

    .dynamic-form-item {
      margin-bottom: 16px;
      padding: 16px;
      border: 1px solid #f0f0f0;
      border-radius: 4px;
      background-color: #fff;
      position: relative;

      .remove-button {
        position: absolute;
        top: 8px;
        right: 8px;
      }
    }

    .add-button {
      width: 100%;
    }
  }

  .form-preview {
    background-color: #fafafa;
    padding: 16px;
    border-radius: 4px;
    margin-top: 24px;

    .preview-title {
      font-weight: 500;
      margin-bottom: 16px;
      color: #333;
    }

    .preview-item {
      display: flex;
      margin-bottom: 8px;

      .preview-label {
        width: 120px;
        color: #666;
      }

      .preview-value {
        flex: 1;
        color: #333;
      }
    }
  }
}
